<template>
  <div>
    <!-- 分类菜单 -->
    <TypeNav />
    <!-- 轮播图 -->
    <Banner />
    <!-- 今日推荐 -->
    <Recommend />
    <!-- 商品排行 -->
    <Rank />
    <!-- 猜你喜欢 -->
    <Like />
    <!--楼层  -->
    <Floor v-for="(floor,index) in floorList" :key="floor.id" :list='floor'/>
    <!-- 商标 -->
    <Brand />
  </div>
</template>

<script>
import Banner from "./Banner/banner.vue";
import Recommend from "./Recommend/recommend.vue";
import Rank from "./Rank/rank.vue";
import Like from "./Like/like.vue";
import Floor from "./Floor/floor.vue";
import Brand from "./Brand/brand.vue";
import {mapState} from 'vuex';
export default {
  components: { Banner, Recommend, Rank, Like, Floor, Brand },
  name: "SphAppHome",
  data() {
    return {};
  },

  mounted() {
    this.$store.dispatch("getFloorList");
  },
  computed: {
    ...mapState({
      floorList: (state) => state.home.floorList,
    }),
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
</style>